package edu.upc.cineplanet.web;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import edu.upc.cineplanet.Domain.Cine;
import edu.upc.cineplanet.service.CineService;

@Controller
public class CineController {

	@Autowired
	CineService service;
	
	@RequestMapping(value="/cines")	
	public String index(Model model){		
		List<Cine> cines = service.obtenerCines(); 		
		model.addAttribute("data", cines);		
		return "vistaCines";
	}
	
}
